Options +FollowSymLinks
Options +Indexes

IndexIgnore */*
RewriteEngine on

# if a directory or a file exists, use it directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

# otherwise forward it to index.php
RewriteRule . index.php

# cache images
#<FilesMatch "\.(ico|pdf|jpg|jpeg|png|gif)$">
#	Header set Cache-Control "max-age=864000, public, must-revalidate"
#</FilesMatch>

<FilesMatch "\.(ico|pdf|jpg|jpeg|png|gif)$">
	Header set Cache-Control "public"
</FilesMatch>

<IfModule mod_deflate.c>
	<FilesMatch "\.(html|php|txt|xml|js|css)$">
		SetOutputFilter DEFLATE
	</FilesMatch>
</IfModule>

# MORE CACHING
<IfModule mod_expires.c>
	ExpiresActive On
	ExpiresByType image/jpg "access 1 year"
	ExpiresByType image/jpeg "access 1 year"
	ExpiresByType image/gif "access 1 year"
	ExpiresByType image/png "access 1 year"
	ExpiresByType text/css "access 1 year"
	ExpiresByType text/html "access 1 year"
    ExpiresByType text/javascript "access 1 year"
    ExpiresByType application/javascript "access 1 year"
	ExpiresByType text/x-javascript "access 1 year"
#   ExpiresByType application/pdf "access 1 month"
#	ExpiresByType application/x-shockwave-flash "access 1 month"
	ExpiresByType image/x-icon "access 1 year"
	ExpiresDefault "access 1 month"
</IfModule>

# PHP error handling for development servers
php_flag display_startup_errors off
php_flag display_errors off
php_flag html_errors off
php_flag log_errors on
php_flag ignore_repeated_errors off
php_flag ignore_repeated_source off
php_flag report_memleaks on
php_flag track_errors on
php_value docref_root 0
php_value docref_ext 0
php_value error_log /var/www/KWP_errors11.log
php_value error_reporting -1
php_value log_errors_max_len 0
